package com.bussiness;

public class AdminBussinessProxy implements com.bussiness.AdminBussiness {
  private String _endpoint = null;
  private com.bussiness.AdminBussiness adminBussiness = null;
  
  public AdminBussinessProxy() {
    _initAdminBussinessProxy();
  }
  
  public AdminBussinessProxy(String endpoint) {
    _endpoint = endpoint;
    _initAdminBussinessProxy();
  }
  
  private void _initAdminBussinessProxy() {
    try {
      adminBussiness = (new com.bussiness.AdminBussinessServiceLocator()).getAdminBussiness();
      if (adminBussiness != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)adminBussiness)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)adminBussiness)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (adminBussiness != null)
      ((javax.xml.rpc.Stub)adminBussiness)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.bussiness.AdminBussiness getAdminBussiness() {
    if (adminBussiness == null)
      _initAdminBussinessProxy();
    return adminBussiness;
  }
  
  public com.beans.Movie[] getAllMovies() throws java.rmi.RemoteException, com.exceptions.ServiceUnavailableException{
    if (adminBussiness == null)
      _initAdminBussinessProxy();
    return adminBussiness.getAllMovies();
  }
  
  public com.beans.Person[] getAllPremiumMembers() throws java.rmi.RemoteException, com.exceptions.ServiceUnavailableException{
    if (adminBussiness == null)
      _initAdminBussinessProxy();
    return adminBussiness.getAllPremiumMembers();
  }
  
  public com.beans.Person[] getAllSimpleMembers() throws java.rmi.RemoteException, com.exceptions.ServiceUnavailableException{
    if (adminBussiness == null)
      _initAdminBussinessProxy();
    return adminBussiness.getAllSimpleMembers();
  }
  
  public com.beans.Person[] getAllPersons() throws java.rmi.RemoteException, com.exceptions.ServiceUnavailableException{
    if (adminBussiness == null)
      _initAdminBussinessProxy();
    return adminBussiness.getAllPersons();
  }
  
  
}